home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / RockRidge / mail / smail-3.1.28 / src / debug.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-07-11  |  3.7 KB  |  160 lines

  1. /* @(#)src/debug.h    1.5 7/11/92 11:48:14 */
  2.  
  3. /*
  4.  *    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
  5.  *    Copyright (C) 1992  Ronald S. Karr
  6.  * 
  7.  * See the file COPYING, distributed with smail, for restriction
  8.  * and warranty information.
  9.  */
  10.  
  11. /*
  12.  * debug.h:
  13.  *    macros used to generate debugging output.
  14.  */
  15.  
  16. /*
  17.  * If the current debug level is above d, output the message, otherwise
  18.  * be silent.
  19.  */
  20. #ifndef NODEBUG
  21. # define DEBUG(d,m) \
  22.      {                        \
  23.      if (d <= debug && errfile) {        \
  24.          (void)fputs(m,errfile);        \
  25.          (void)fflush(errfile);        \
  26.      }                    \
  27.      }
  28. # define DEBUG1(d,m,a) \
  29.     {                        \
  30.     if (d <= debug && errfile) {        \
  31.         (void)dprintf(errfile,m,a);        \
  32.         (void)fflush(errfile);        \
  33.     }                    \
  34.     }
  35. # define DEBUG2(d,m,a,b) \
  36.     {                        \
  37.     if (d <= debug && errfile) {        \
  38.         (void)dprintf(errfile,m,a,b);    \
  39.         (void)fflush(errfile);        \
  40.     }                    \
  41.     }
  42. # define DEBUG3(d,m,a,b,c) \
  43.     {                        \
  44.     if (d <= debug && errfile) {        \
  45.         (void)dprintf(errfile,m,a,b,c);    \
  46.         (void)fflush(errfile);        \
  47.     }                    \
  48.     }
  49. # define DEBUG4(d,m,a,b,c,e) \
  50.     {                        \
  51.     if (d <= debug && errfile) {        \
  52.         (void)dprintf(errfile,m,a,b,c,e);    \
  53.         (void)fflush(errfile);        \
  54.     }                    \
  55.     }
  56. #else    /* NODEBUG */
  57. # define DEBUG(d,m)
  58. # define DEBUG1(d,m,a)
  59. # define DEBUG2(d,m,a,b)
  60. # define DEBUG3(d,m,a,b,c)
  61. # define DEBUG4(d,m,a,b,c,e)
  62. #endif    /* NODEBUG */
  63.  
  64. /*
  65.  * put various debug levels here so that we can change this file and
  66.  * recompile, rather than changing the DEBUG statements themselves to
  67.  * concentrate on a particular routine
  68.  */
  69.  
  70. /* debug levels for functions in field.c */
  71. #define DBG_FIELD_HI    50
  72. #define DBG_FIELD_MID    9
  73. #define DBG_FIELD_LO    6
  74.  
  75. /* debug levels for functions in addr.c */
  76. #define DBG_ADDR_HI    50
  77. #define DBG_ADDR_MID    9
  78. #define DBG_ADDR_LO    6
  79.  
  80. /* debug levels for functions in log.c */
  81. #define DBG_LOG_HI    50
  82. #define DBG_LOG_MID    5
  83. #define DBG_LOG_LO    1
  84.  
  85. /* debug levels for functions in queue.c */
  86. #define DBG_QUEUE_HI    50
  87. #define DBG_QUEUE_MID    5
  88. #define DBG_QUEUE_LO    1
  89.  
  90. /* debug levels for functions in retry.c */
  91. #define DBG_RETRY_HI    50
  92. #define DBG_RETRY_MID    5
  93. #define DBG_RETRY_LO    1
  94.  
  95. /* debug levels for functions in spool.c */
  96. #define DBG_SPOOL_HI    50
  97. #define DBG_SPOOL_MID    5
  98. #define DBG_SPOOL_LO    1
  99.  
  100. /* debug levels for functions in header.c */
  101. #define DBG_HEADER_HI    50
  102. #define DBG_HEADER_MID    9
  103. #define DBG_HEADER_LO    6
  104.  
  105. /* debug levels for directing code in direct.c */
  106. #define DBG_DIRECT_HI    50
  107. #define DBG_DIRECT_MID    8
  108. #define DBG_DIRECT_LO    1
  109.  
  110. /* debug levels for routing code in route.c */
  111. #define DBG_ROUTE_HI    50
  112. #define DBG_ROUTE_MID    8
  113. #define DBG_ROUTE_LO    1
  114.  
  115. /* debug levels for main code in main.c */
  116. #define DBG_MAIN_HI    50
  117. #define DBG_MAIN_MID    8
  118. #define DBG_MAIN_LO    2
  119.  
  120. /* debug levels for notification code in notify.c */
  121. #define DBG_NOTIFY_HI    50
  122. #define DBG_NOTIFY_MID    5
  123. #define DBG_NOTIFY_LO    1
  124.  
  125. /* debug levels for drivers */
  126. #define DBG_DRIVER_HI    20
  127. #define DBG_DRIVER_MID    2
  128. #define DBG_DRIVER_LO    1
  129.  
  130. /* debug levels for resolving code in resolve.c */
  131. #define DBG_RESOLVE_HI    50
  132. #define DBG_RESOLVE_MID    8
  133. #define DBG_RESOLVE_LO    1
  134.  
  135. /* debug levels for remote delivery code in remote.c */
  136. #define DBG_REMOTE_HI    50
  137. #define DBG_REMOTE_MID    5
  138. #define DBG_REMOTE_LO    1
  139.  
  140. /* debug levels for aliasing code in alias.c */
  141. #define DBG_ALIAS_HI    50
  142. #define DBG_ALIAS_MID    8
  143. #define DBG_ALIAS_LO    1
  144.  
  145. /* debug levels for hasing code in hash.c */
  146. #define DBG_HASH_VHI   120
  147. #define DBG_HASH_HI    90
  148. #define DBG_HASH_MID    60
  149. #define DBG_HASH_LO    30
  150.  
  151. /* debug levels for startup file processing code in startup.c */
  152. #define DBG_STARTUP_HI    50
  153. #define DBG_STARTUP_MID    25
  154. #define DBG_STARTUP_LO    10
  155.  
  156. /* debug levels for startup file generation code in smailconf.c */
  157. #define DBG_CONF_HI    50
  158. #define DBG_CONF_MID    8
  159. #define DBG_CONF_LO    1
  160.